package com.tuanzi.loan.business.service.credithousekeeper.impl;

import com.tuanzi.loan.business.repository.credithousekeeper.CreditCompensatoryWithdrawOrderRepository;
import com.tuanzi.loan.business.service.credithousekeeper.CreditCompensatoryWithdrawOrderService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.credithousekeeper.CreditCompensatoryWithdrawOrderRequest;
import com.tuanzi.loan.vo.response.credithousekeeper.CreditCompensatoryWithdrawOrderResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class CreditCompensatoryWithdrawOrderImpl implements CreditCompensatoryWithdrawOrderService{

    @Autowired
    private CreditCompensatoryWithdrawOrderRepository creditCompensatoryWithdrawOrderRepository;

    @Override
    public Page<CreditCompensatoryWithdrawOrderResponse> list(PageSearcher<CreditCompensatoryWithdrawOrderRequest> pageSearcher) {
        return creditCompensatoryWithdrawOrderRepository.list(pageSearcher.getSearchCondition(),pageSearcher.getPageable());
    }
}
